Image-processing method for removing light zones

ABSTRACT

An image-processing method for filtering light pollution appearing in a video image stream acquired by a video camera. The method includes, for a current image of the video image stream, the steps of subtracting the background represented in the current image in order to obtain the foreground of the current image, determining a brightening matrix, determining a compensating matrix by restricting the values of the pixels of the determined brightening matrix, segmenting the determined brightening matrix, determining a mask from the segmented brightening matrix, applying the mask to the determined compensating matrix in order to obtain a filtering matrix, and filtering the foreground of the current image by applying the filtering matrix in order to decrease the zones of light pollution in the images of the image stream.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is the U.S. National Phase Application of PCTInternational Application No. PCT/FR2018/050627, filed Mar. 15, 2018,which claims priority to French Patent Application No. 1753584, filedApr. 25, 2017, the contents of such applications being incorporated byreference herein.

FIELD OF THE INVENTION

The invention relates to the field of image processing and moreparticularly relates to an image-processing method allowing bright zonesliable to mask moving objects or persons in a stream of video imagescaptured by a camera to be removed.

BACKGROUND OF THE INVENTION

At the present time, it is known to detect moving objects or people in astream of video images captured by a camera. Such detection may haveseveral aims. For example, when the camera is fastened to a streetlight, it is known to detect pedestrians walking in proximity to thestreet light in order to increase its brightness and thus increase theillumination of the entire zone or indeed to orient the flux of light intheir direction. In another example, it may be useful to detectindividuals circulating in a preset zone for the purposes ofsurveillance.

One known type of solution consists in applying a set of Gaussiandistribution functions to the pixels of the images acquired by thecamera in order to differentiate between pixels the brightness of whichvaries little or not at all, which are considered to represent thebackground of the filmed scene, and pixels the brightness of whichvaries greatly, which are then considered to represent moving objects,this type of solution being called gaussian mixture models (GMM).

A problem arises, in particular at night, when the environment filmed bythe camera contains zones of high brightness that do not correspond tolight-emitting objects. In this case, these bright zones may beconsidered to be moving objects in the images when a set of Gaussiandistribution functions are applied thereto, this possibly leading tointerpretation or handling errors during the image processing. Forexample, when it is desired to track a vehicle at night, the camera mayend up tracking the zone illuminated by the headlamps of the vehiclerather than the vehicle itself, this being problematic in the case ofsurveillance. Likewise, it may also be difficult, or even impossible, todetect the shape of objects illuminated by the headlamps of a vehicle ifsaid objects are immersed in the light of the headlamps, this also beinga drawback.

SUMMARY OF THE INVENTION

It would therefore be advantageous to provide an image-processingsolution allowing zones of light pollution appearing in such images tobe removed in order to correctly detect objects or people in theenvironment of the camera.

To this end, one aspect of the present invention is an image-processingmethod for filtering light pollution appearing in a video image streamacquired by a video camera.

Said method is noteworthy in that it comprises, for a current image ofsaid video image stream, the steps of:

-   -   subtracting the background represented in said current image in        order to obtain the foreground of the current image,    -   determining a brightening matrix identifying the pixels of the        current image the brightness of which is higher than the        time-averaged brightness of the pixels of the image,    -   determining a compensating matrix by restricting the values of        the pixels of the determined brightening matrix to between a        minimum value and a maximum value,    -   segmenting the determined brightening matrix,    -   determining a mask from the segmented brightening matrix,    -   applying said mask to the determined compensating matrix in        order to obtain a filtering matrix, and    -   filtering the foreground of the current image by applying said        filtering matrix in order to decrease the zones of light        pollution in the images of the image stream.

The expression “current image” is understood to mean the image of thestream currently being processed, the images of the stream beingprocessed in succession in the order of the stream. Furthermore, thebrightening matrix characterizes pixels that are brighter than normal inthe video image stream.

By virtue of the method according to an aspect of the invention, brightzones of an image that could be a drawback for the detection of anobject or a person are mostly or completely removed, making saiddetection easy, fast and reliable. In particular, the method accordingto an aspect of the invention allows zones detected as being objects bythe background subtraction but that are in fact illuminated zones, forexample vehicle headlamps, to be removed. Nonlimitingly, the methodaccording to an aspect of the invention is advantageously applicable toimages in which it is desired to detect moving objects or people.Likewise, the method according to an aspect of the invention isadvantageously applicable to images in which it is desired to detectobjects or people under poor lighting conditions and in particular atnight.

Advantageously, the method comprises, before the steps of subtractingand determining a brightening matrix, a step of preprocessing thecurrent image.

Preferably, the step of determining a brightening matrix comprises thesubsteps of:

-   -   computing the time average of the brightness of each pixel of        the current image from a plurality of successive images        extracted from the image stream,    -   computing the time average of the standard deviations of the        brightness of each pixel of the current image from a plurality        of successive images extracted from the image stream,    -   determining the brightening matrix identifying the pixels of the        current image the brightness of which is higher than the average        brightness on the basis of the computed average of the        brightness of each pixel of the current image and of the        computed time average of the standard deviations of the        brightness of each pixel of the current image.

In one preferred embodiment, the brightening matrix is determined pixelby pixel using the following equation:

${BrighterMatrix}_{\lbrack{x,y}\rbrack} = \left\{ \begin{matrix}{\frac{{Frame}_{\lbrack{x,y}\rbrack} - {GlobalAverage}_{\lbrack{x,y}\rbrack}}{{GlobalStdDeviation}_{\lbrack{x,y}\rbrack}},} & \left\{ \begin{matrix}{{StdDeviationFrame}_{\lbrack{x,y}\rbrack} > \rho} \\{and} \\{{Frame}_{\lbrack{x,y}\rbrack} > {GlobalAverage}_{\lbrack{x,y}\rbrack}}\end{matrix} \right. \\{0,} & {Otherwise}\end{matrix} \right.$where Frame_([x,y]) is the current image, [x,y] are the coordinates of apixel of the image, GlobalAverage_([x,y]) is the time average of thebrightness of each pixel of the current image Frame_([x,y]) based on aplurality of successive images extracted from the image stream,GlobalStdDeviation_([x,y]) is the time average of the standarddeviations of the brightness of each pixel of the current imageFrame_([x,y]) based on a plurality of successive images extracted fromthe image stream and ρ is a noise-decreasing coefficient (to beestablished depending on the application). Preferably, the value of ρ isclose to 0, for example lower than 0.025, in order to effectivelydecrease noise in the brightening matrix.

Advantageously, the step of determining the compensating matrixcomprises, following the restriction of the values of the pixels, anormalization, of said restricted values, preferably between 0 and 1.

According to one aspect of the invention, the step of segmenting thedetermined brightening matrix comprises the substeps of:

-   -   smoothing the determined brightening matrix,    -   limiting the value of the pixels of the determined brightening        matrix to below a threshold value, and    -   binarizing the limited brightening matrix in order to obtain the        segmented brightening matrix.

Also advantageously, the step of determining the mask comprises thesubsteps of:

-   -   applying a morphological process to the segmented brightening        matrix,    -   determining, in said morphologically processed brightening        matrix, blobs of pixels the number of pixels of which is lower        or higher than a preset threshold, and    -   binarizing to the value 1 the pixels of the blobs the determined        number of pixels of which is higher than the preset threshold        and to the value 0 the pixels of the blobs the determined number        of pixels of which is lower than the preset threshold.

According to one aspect of the invention, the method comprises, prior tothe filtering step, a step of smoothing the filtering matrix.

According to another aspect of the invention, the method comprises astep of detecting a person or an object represented in thefiltered-image stream.

An aspect of the invention also relates to a processing module forfiltering light pollution appearing in an image stream acquired by avideo camera, said processing module being characterized in that it isconfigured to receive an image stream from said video camera, and, for acurrent image of said image stream:

-   -   to subtract the background represented in said current image in        order to obtain the foreground of the current image,    -   to determine a brightening matrix identifying the pixels of the        current image the brightness of which is higher than the        time-averaged brightness of the pixels of the image,    -   to determine a compensating matrix by restricting the values of        the pixels of the determined brightening matrix to between a        minimum value and a maximum value,    -   to segment the determined brightening matrix,    -   to determine a mask from the segmented brightening matrix,    -   to apply said mask to the determined compensating matrix in        order to obtain a filtering matrix, and    -   to filter the foreground of the current image by applying said        smoothed filtering matrix in order to decrease the zones of        light pollution in the images of the image stream.

Preferably, the processing module is configured to smooth the filteringmatrix.

Also preferably, the processing module is configured to detect a personor an object represented in the filtered-image stream.

An aspect of the invention also relates to an image-processing systemfor filtering light pollution appearing in an image stream acquired by avideo camera. Said system is noteworthy in that it comprises a videocamera, and a processing module such as presented above linked to saidvideo camera by a communication link.

BRIEF DESCRIPTION OF THE DRAWINGS

Other features and advantages of an aspect of the invention will emergeduring the following description, given with reference to the appendedfigures, which are given by way of non-limiting example and in whichidentical references are given to similar objects.

FIG. 1 schematically shows one embodiment of the system according to anaspect of the invention, in which embodiment the light source is astreetlamp equipped with a video camera.

FIG. 2 illustrates one embodiment of the method according to an aspectof the invention.

FIG. 3 is an image captured at night by a camera mounted on astreetlight, in which image a motor vehicle and the zones illuminated byits headlamps may be seen.

FIG. 4 is the image of FIG. 3 after processing with the method accordingto an aspect of the invention, showing that the detections in the zonesilluminated by the headlamps of the vehicle have substantiallydisappeared.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

The image-processing system according to an aspect of the inventionallows most of the bright zones liable to mask objects or people inimages to be removed, in order in particular to improve the detectionthereof. These objects or people may for example be vehicles orpedestrians driving in a traffic lane or walking on a sidewalk,respectively.

FIG. 1 schematically shows an example of a system 1 according to anaspect of the invention. The system 1 comprises a street light 10 onwhich a video camera 100 is mounted, and a processing module 20 linkedto said camera 100 by a communication link L1 in order to receive astream of video images captured by the camera 100.

This communication link L1 may be wired (electrical cable) or wireless(for example via a Wi-Fi, Wimax or 4G connection or any other known typeof connection).

In the illustrated embodiment, the camera 100 is mounted on the streetlight 10 in order to film the environment of said street light 10, forexample in order to monitor a traffic lane. It will be noted that anaspect of the invention may be applied to any type of camera 100 mountedon any type of holder in order to film any type of zone in which it isdesired to detect the presence of people or objects, such as for examplepedestrians or motor vehicles.

Preferably, the camera 100 is able to remain stationary at least for apreset time interval in order to acquire a video image stream of a givenzone, for example a segment of a traffic lane.

In the preferred embodiment described below (which is completelynonlimiting), the processing module 20 is configured to perform a seriesof operations on the images of the video stream captured by the camera.

To this end, the processing module 20 preferably comprises a memory zone220 and a processor 210 suitable for implementing instructions stored insaid memory zone 220 and allowing the operations described below to becarried out on each current image of the stream.

The expression “current image” is understood to mean the image beingprocessed by the processing module 20 in the video image stream receivedby the camera 100, the images of the screen being processed insuccession.

Firstly, the processing module 20 is configured to subtract thebackground represented in the current image in order to obtain theforeground of said current image. Such a subtraction may for example beachieved using a Gaussian mixture model (GMM) as will be described belowwith respect to the implementation of an aspect of the invention.

For each image of the stream, the processing module 20 is firstlyconfigured to determine a brightening matrix identifying the pixels ofthe current image the brightness of which is higher than thetime-averaged brightness of the pixels of the image. This brighteningmatrix characterizes the pixels representing elements the brightness ofwhich has increased, potentially because of a light source. By way ofexample, such pixels may represent the light of the headlamps of a motorvehicle being driven on a road filmed by the camera 100.

In one preferred embodiment, in order to determine this brighteningmatrix, the processing module 20 is configured to compute the timeaverage of the brightness of each pixel of the current image from aplurality of successive images extracted from the image stream, in orderto compute the time average of the standard deviations of the brightnessof each pixel of the current image from a plurality of successive imagesextracted from the image stream and in order to determine a brighteningmatrix identifying the pixels of the current image the brightness ofwhich is higher than the average brightness on the basis of the computedaverage of the brightness of each pixel of the current image and of thecomputed average of the standard deviations of the brightness of eachpixel of the current image.

To this end, the processing module 20 is configured to compute, for acurrent image Frame, the matrix GlobalAverage_(t) of the averagebrightnesses at the time t by computing an exponential envelope usingthe following equation:GlobalAverage_([x,y])=(1−α)×(GlobalAverage_(t−1[x,y]))+(α)×(Frame_([x,y]))where α is a scalar parameter between 0 and 1 to be established for eachapplication, and which sets the decay of the exponential envelope,Frame_([x,y]) is the value of the pixel of coordinates [x,y] of thecurrent image (i.e. its brightness value). The initial value ofGlobalAverage_(t) may be the first image of the video stream received bythe camera 100.

Again in this embodiment, the processing module 20 is configured tocompute the average standard deviation StdDeviationFrame of thebrightness of each pixel of the current image Frame with respect to itsneighbors, using the following equation:StdDeviationFrame_([x,y])=√{square root over (μ(Frame_([x,y])²)−[μ(Frame_([x,y]))]²)}where Frame_([x,y]) is the value of the pixel of coordinates [x,y] ofthe current image (i.e. its brightness value), and where μ is a meanfilter, with for example a 3×3 kernel.

Again in this example, the processing module 20 is configured to computea matrix called GlobalStdDeviation the value of each pixel of whichcorresponds to the time average of the standard deviation of the pixelof same coordinates in a series of prior images of the video stream,using an exponential envelope defined by the following equation, foreach pixel:GlobalStdDeviation_(t[x,y])=(1−α)×(GlobalStdDeviation_(t−1[x,y]))+(α)×(StdDeviationFrame_([x,y]))where α has the same value as that used to compute GlobalAverage.

Preferably, the processing module 20 is configured to determine abrightening matrix BrighterMatrix pixel by pixel using the followingequation:

${BrighterMatrix}_{\lbrack{x,y}\rbrack} = \left\{ \begin{matrix}{\frac{{Frame}_{\lbrack{x,y}\rbrack} - {GlobalAverage}_{\lbrack{x,y}\rbrack}}{{GlobalStdDeviation}_{\lbrack{x,y}\rbrack}},} & \left\{ \begin{matrix}{{StdDeviationFrame}_{\lbrack{x,y}\rbrack} > \rho} \\{and} \\{{Frame}_{\lbrack{x,y}\rbrack} > {GlobalAverage}_{\lbrack{x,y}\rbrack}}\end{matrix} \right. \\{0,} & {Otherwise}\end{matrix} \right.$where Frame_([x,y]) is the current image, [x,y] are the coordinates of apixel of the current image Frame_([x,y]), and ρ is a parameter to beestablished depending on the application. Preferably, the value of ρ isclose to 0, for example lower than 0.025, in order to decrease noise inthe brightening matrix. The values of this brightening matrix correspondto the deviation, weighted by the standard deviation of thetime-averaged brightness, of the current brightness of each pixel withrespect to the time-averaged brightness.

The processing module 20 is also configured to determine a compensatingmatrix by limiting (i.e. by restricting) the values of the determinedbrightening matrix to between a minimum value and a maximum value, forexample to between 1 and 5, in order to limit aberrant values. In otherwords, with respect to dynamic range, the determined compensating matrixallows values that are irrelevant to be removed after normalization,thereby in particular limiting values that are too high.

Preferably, the processing module 20 is also configured to normalize thevalues of the compensating matrix between 0 and 1.

The processing module 20 is configured to segment the determinedbrightening matrix in order to obtain a binary image. According to onepreferred embodiment, the brightening matrix is firstly smoothed with aGaussian filter and then the values of the brightening matrix are cappedat a value, for example equal to 5 times the standard deviation of thetime-averaged brightness, in order to preserve only the dynamic rangerelevant to the detection of disrupting light. Next, the processingmodule 20 is configured to determine the segmented brightening matrixusing an automatic thresholding algorithm on the smoothed matrix, forexample the algorithm of Li (Li & Tam, 1998). The segmented brighteningmatrix may then be normalized between 0 and 1.

The processing module 20 is configured to determine a mask from thesegmented brightening matrix. This mask will be applied to thecompensating matrix in order to obtain a filtering matrix (describedbelow).

Preferably, the mask is obtained by applying a morphological process tothe segmented brightening matrix. This process comprises an erosion witha kernel of size N, followed by a dilation with a kernel size N+2 and byan erosion with a kernel of size N. The size N of the kernel isdependent on the size of the image and on the desired level offiltering. This serves to group the pixels into more compact regions ofpixels (blobs).

Next, using a blob-detecting algorithm, the processing module 20 isconfigured to detect the blobs. Depending on the nature of theapplication and the desired characteristics, certain of these blobs willbe processed differently.

For example, if blob area is used as criterion, blobs with an areasmaller than a preset threshold may be processed differently, the valueof this threshold depending on the application. In an example ofdetection of pedestrians and automobiles, this allows blobs potentiallycorresponding to pedestrians (representing a smaller area) to beprocessed from blobs corresponding to illuminated zones, such as causedby the light projected by the headlamps of a vehicle.

Lastly, for each blob, the coordinates of each of the pixels thereof areused and the value of the corresponding pixel (of same coordinates) inthe compensating matrix is adjusted, this yielding the filtering matrix,as will be described below. For example, the value may be adjusted to 1for pixels to be removed from the foreground (illuminated zones, blobswith a large area) and to 0 for pixels to be kept in the foreground (forexample, pedestrians with light-colored jackets).

The processing module 20 is configured to apply the mask to thecompensating matrix in order to obtain a filtering matrix.

The filtering matrix allows those zones of the current image of theforeground which have particular characteristics to be filtered,depending on the targeted application. Preferably, the mask modifiesregions (zones) of large size in order to ensure the removal thereof(region size is a configuration parameter). Again preferably, the maskalso modifies regions (zones) of small size in order to ensure that theyare not removed. For example, in the case of a smart light where the aimof the detection is to locate pedestrians, zones of small size are savedin order to prevent potential detections of pedestrians from beingdeleted.

Thus, the pixels of the filtering matrix the value of which is equal to1 will completely remove the detection of the corresponding pixel duringthe filtering of the foreground of the current image and the pixels thevalue of which is equal to 0 will not modify the detection of thecorresponding pixel during the filtering.

In one preferred embodiment, the processing module 20 is also configuredto smooth the filtering matrix before the latter is applied to thecurrent image of the foreground. Preferably, this smoothing is carriedout with a Gaussian filter (for example of standard deviation σ=3 and akernel of 7×7 pixels), and next the values of the pixels are normalized,preferably between 0 and 1.

The processing module 20 is configured to filter the foreground of thecurrent image by applying the filtering matrix in order to decrease oreven remove the zones of light pollution in the images of the imagestream.

An aspect of the invention will now be described in terms of theimplementation thereof with reference to FIG. 2.

The camera 100 firstly acquires a video image stream and sends it overthe communication link L1 to the processing module 20, which receives itin a step E0.

Next, for each image of the image stream, the processing module 20carries out the steps described below. Each of the expressions “currentimage” and “frame” is understood to mean the image of the image streamthat is currently being processed, the images being processed insuccession in the order in which they are sequenced in the stream ofimages captured by the camera 100.

Firstly, in a step E1, the processing module 20 pre-processes thecurrent image Frame. The processing module 20 converts the current imageFrame into a grayscale image, smooths the current image Frame in orderto partially remove noise then increases the contrast.

Next, in a step E2, the processing module 20 subtracts the backgroundrepresented in the preprocessed image in order to obtain an image saidto be of the foreground of the current image Frame, i.e. representingthe foreground of the current image Frame.

This subtraction may be achieved using a Gaussian mixture model (GMM)which consists in estimating, with a set of Gaussian distributionfunctions, the distribution of the brightness values for each of thepixels of the images acquired by the camera in order to differentiatebetween pixels the brightness of which varies little or not at all overtime, which are considered to represent the background of the filmedscene, and pixels the brightness of which varies greatly, which are thenconsidered to potentially represent moving objects.

The processing module 20 will then post-process the current image, whichpost-processing may partially be carried out in parallel with thepre-processing step (E1) and the subtracting step (E2).

To carry out this post-processing, the processing module 20 firstlydetermines, in a step E31, a brightening matrix identifying the pixelsof the current image Frame the brightness of which is higher than thetime-averaged brightness. In other words, the brightening is determinedon the basis of the variation in the current brightness with respect tothe time-averaged brightness of each pixel of the current image Frame.

To this end, in one preferred embodiment, the processing module employsGaussian filtering based on a 3×3 kernel with the aim of smoothing thecurrent image Frame. Next, the processing module computes the timeaverage GlobalAverage of the brightness of each pixel of the currentimage using the following equation:GlobalAverage_(t[x,y])=(1−α)*GlobalAverage_(t−1[x,y])+α*Frame_([x,y])where [x,y] are the coordinates of a pixel of the image and α is aparameter between 0 and 1 to be established for each application, andwhich sets the decay of the exponential envelope. The initial value ofGlobalAverage may be the first image of the video stream received by thecamera 100. Next, the processing module 20 computes the time-averagedstandard deviation GlobalStdDeviation of the brightness of each pixel ofthe current image Frame, i.e. from a plurality of successive imagesextracted from the image stream. To do this, the processing module 20firstly computes an image StdDeviationFrame the value of each pixel ofwhich is the standard deviation with respect to its neighbors, thensubsequently computes an image GlobalStdDeviation the value of eachpixel of which corresponds to the time average of the standard deviationof the pixel of same coordinates in a series of prior images of thevideo stream. This average may be calculated with an exponentialenvelope defined by the following equation:GlobalStdDeviation_(t[x,y])=(1−α)*GlobalStdDeviation_(t−1[x,y])+α*StdDeviationFrame_([x,y])where [x,y] are the coordinates of a pixel of the image and α has thesame value as that used to compute GlobalAverage. Next, the processingmodule 20 determines a brightening matrix identifying the pixels of thecurrent image the brightness of which is higher than the averagebrightness using the following equation:

${BrighterMatrix}_{\lbrack{x,y}\rbrack} = \left\{ \begin{matrix}{\frac{{Frame}_{\lbrack{x,y}\rbrack} - {GlobalAverage}_{\lbrack{x,y}\rbrack}}{{GlobalStdDeviation}_{\lbrack{x,y}\rbrack}},} & \left\{ \begin{matrix}{{StdDeviationFrame}_{\lbrack{x,y}\rbrack} > \rho} \\{and} \\{{Frame}_{\lbrack{x,y}\rbrack} > {GlobalAverage}_{\lbrack{x,y}\rbrack}}\end{matrix} \right. \\{0,} & {Otherwise}\end{matrix} \right.$where [x,y] are the coordinates of a pixel of the image, Frame_([x,y])is the current image and ρ is a parameter to be established depending onthe application. Preferably, the value of ρ is close to 0 in order todecrease noise in the brightening matrix.

In a step E32, the processing module 20 then determines the compensatingmatrix. To do this, in this preferred example, the processing module 20limits the values of the pixels of the determined brightening matrix tobetween a minimum value and a maximum value then normalizes the value ofeach pixel, preferably between 0 and 1.

In parallel, in a step E33, the processing module 20 segments thedetermined brightening matrix. To do this, in this preferred example,the processing module firstly smooths the determined brightening matrixusing a smoothing filter based on the average, with a kernel dependenton the size of the image. The processing module 20 then limits the valueof each pixel of the determined and smoothed brightening matrix so thatit is lower than a threshold value in order to limit aberrant values.The processing module 20 then binarizes the smoothed and thresholdedbrightening matrix in order to obtain the segmented brightening matrix.This binarization consists in making the value of each pixel equal to 0or to 1. It may for example be carried out using a threshold computedusing the algorithm of Li (Li and Tam, 1998).

In a step E34, the processing module 20 determines a mask from thesegmented brightening matrix. To this end, the processing module 20firstly uses a morphological process on the segmented brighteningmatrix, which comprises an erosion of the segmented image with a kernelof size N, followed by a dilation with a kernel of size N+2 and finallyan erosion with a kernel of size N, the size N of the kernel beingdependent on the size of the image and on the desired level offiltering. The processing module 20 then determines, in themorphologically processed brightening matrix, groups of connected pixels(blobs). This step may for example be carried out using the algorithm ofSuzuki (Suzuki, 1985). The processing module 20 then separates the blobsdepending on their area. Those the area of which is smaller than athreshold will be given the minimum value (for example 0) and those thearea of which is larger than or equal to the same threshold will begiven the maximum value (for example 1).

In a step E35, the processing module 20 generates a filtering matrix byapplying the determined mask to the compensating matrix. To do this, foreach blob, the coordinates of each of the pixels thereof and its valueare used to assign the same value to the corresponding pixel (of samecoordinates) in the compensating matrix.

In a step E36, the processing module 20 smooths the filtering matrix,for example using a Gaussian filter.

The processing module 20 then filters, in a step E37, the foreground ofthe current image by applying thereto the smoothed filtering matrix inorder to decrease the zones of light pollution in the images of theimage stream.

In a step E4, the processing module 20 then easily detects whereappropriate an object or a person in the image stream, by virtue of thepixels remaining in the obtained foreground.

The method may also, in an optional step E5, track a person or an objectdetected in the images by virtue of a tracking algorithm (know per se)suitable for the desired application.

FIG. 3 shows an image captured at night by a camera mounted on astreetlight, in which image a motor vehicle and the zones illuminated byits headlamps may be seen. In FIG. 3, most of the white pixelscorrespond to pixels detected as foreground before applying the methodof an aspect of the invention. FIG. 4 shows the image of FIG. 3, afterprocessing with the method according to an aspect of the invention. Itmay be seen that the zones illuminated by the headlamps of the vehiclehave substantially disappeared from the foreground in the processedimages, this making it possible to make detection of a person or object(in the present case the vehicle) particularly easy and reliable, inparticular when a GMM algorithm is applied.

The invention claimed is:
 1. An image-processing method for filteringlight pollution appearing in a video image stream acquired by a videocamera, said method comprising, for a current image of said video imagestream: subtracting a background represented in said current image inorder to obtain a foreground of the current image, determining abrightening matrix identifying pixels of the current image where theidentified pixels have a brightness which is higher than a time-averagedbrightness of all pixels of the current image, determining acompensating matrix by restricting values of the identified pixels ofthe determined brightening matrix to between a minimum value and amaximum value, segmenting the determined brightening matrix, determininga mask from the segmented brightening matrix, applying said mask to thedetermined compensating matrix in order to obtain a filtering matrix,and filtering the foreground of the current image by applying saidfiltering matrix to the foreground of the current image in order todecrease the zones of light pollution in images of the video imagestream.
 2. The method as claimed in claim 1, wherein the step ofdetermining a brightening matrix comprises: computing a time average ofa brightness of each pixel of the current image from a plurality ofsuccessive images extracted from the video image stream, computing atime average of standard deviations of the brightness of each pixel ofthe current image from a plurality of successive images extracted fromthe video image stream, determining the brightening matrix identifyingthe pixels of the current image that have the brightness which is higherthan the time-averaged brightness of all pixels of the current image ona basis of the computed time average of the brightness of each pixel ofthe current image and of the computed time average of the standarddeviations of the brightness of each pixel of the current image.
 3. Themethod as claimed in the claim 2, wherein the brightening matrix isdetermined pixel by pixel using the following equation:${BrighterMatrix}_{\lbrack{x,y}\rbrack} = \left\{ \begin{matrix}{\frac{{Frame}_{\lbrack{x,y}\rbrack} - {GlobalAverage}_{\lbrack{x,y}\rbrack}}{{GlobalStdDeviation}_{\lbrack{x,y}\rbrack}},} & \left\{ \begin{matrix}{{StdDeviationFrame}_{\lbrack{x,y}\rbrack} > \rho} \\{and} \\{{Frame}_{\lbrack{x,y}\rbrack} > {GlobalAverage}_{\lbrack{x,y}\rbrack}}\end{matrix} \right. \\{0,} & {Otherwise}\end{matrix} \right.$ where Frame_([x, y]) is the current image, [x, y]are the coordinates of a pixel of the image, GlobalAverage_([x,y]) isthe time average of the brightness of each pixel of the current imageFrame_([x, y]) based on a plurality of successive images extracted fromthe image stream, GlobalStdDeviation_([x,y]) is the time average of thestandard deviations of the brightness of each pixel of the current imageFrame_([x, y]) based on a plurality of successive images extracted fromthe image stream and ρ is a noise-decreasing coefficient.
 4. The methodas claimed in claim 1, wherein the determining the compensating matrixcomprises, following the restriction of the values of the pixels, anormalization, of said restricted values, preferably between 0 and
 1. 5.The method as claimed in claim 1, wherein the segmenting the determinedbrightening matrix comprises: smoothing the determined brighteningmatrix, limiting the value of the pixels of the determined brighteningmatrix to below a threshold value, and binarizing the limitedbrightening matrix in order to obtain the segmented brightening matrix.6. The method as claimed in claim 1, wherein the determining the maskcomprises: applying a morphological process to the segmented brighteningmatrix, determining, in said morphologically processed brighteningmatrix, blobs of pixels in which a number of pixels of each blob arelower or higher than a preset threshold, and binarizing to a value of 1,pixels of blobs in which a determined number of pixels is higher thanthe preset threshold and to a value of 0, pixels of blobs in which adetermined number of pixels is lower than the preset threshold.
 7. Themethod as claimed in claim 1, furthermore comprising, prior to thefiltering, smoothing the filtering matrix.
 8. The method as claimed inclaim 1, further comprising detecting a person or an object representedin the filtered foreground of the current image.
 9. A processing modulefor filtering light pollution appearing in an image stream acquired by avideo camera, said processing module being configured to receive theimage stream from said video camera, and, for a current image of saidimage stream: to subtract a background represented in said current imagein order to obtain a foreground of the current image, to determine abrightening matrix identifying pixels of the current image that have abrightness which is higher than a time-averaged brightness of all pixelsof the current image, to determine a compensating matrix by restrictingvalues of the identified pixels of the determined brightening matrix tobetween a minimum value and a maximum value, to segment the determinedbrightening matrix, to determine a mask from the segmented brighteningmatrix, to apply said mask to the determined compensating matrix inorder to obtain a filtering matrix, and to filter the foreground of thecurrent image by applying said filtering matrix to the foreground of thecurrent image in order to decrease the zones of light pollution inimages of the image stream.
 10. An image-processing system for filteringlight pollution appearing in an image stream acquired by a video camera,said system comprising: the video camera, and the processing module asclaimed in claim 9, said processing module being linked to said videocamera by a communication link.